:root {
    --primary-gradient: linear-gradient(135deg, #6e8efb, #a777e3);
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --button-bg: #6e8efb;
    --button-hover: #5d7ce0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary-gradient);
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.card-container {
    width: 100%;
    height: 400px;
    perspective: 1000px;
}

.card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    cursor: pointer;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.card-back {
    transform: rotateY(180deg);
}

.word {
    font-size: 4.5em;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.phonetic {
    font-size: 1.8em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.meaning {
    font-size: 1.7em;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.4;
}

.example {
    font-size: 1.6em;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.4;
}

.controls {
    display: none;
    gap: 15px;
}

button {
    padding: 12px 25px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    background: var(--button-bg);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.progress {
    font-size: 1.1em;
    color: white;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .card-container {
        height: 300px;
    }

    .word {
        font-size: 2em;
    }

    .phonetic {
        font-size: 1em;
    }

    .meaning {
        font-size: 1.1em;
    }

    .example {
        font-size: 1em;
    }

    button {
        padding: 10px 20px;
        font-size: 1em;
    }
    .controls {
        display: flex;
    }
}

/* 添加悬停效果 */
.card-container:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* 添加卡片内容淡入效果 */
.card-front > *,
.card-back > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为不同元素设置不同的动画延迟 */
.word { animation-delay: 0.1s; }
.phonetic { animation-delay: 0.2s; }
.meaning { animation-delay: 0.3s; }
.example { animation-delay: 0.4s; }